﻿using System;
using System.Collections.Generic;
using Abp.Application.Services.Dto;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace ARchGL.Platform.Authorization.Users.Dto
{
    public class UserListDto : EntityDto<long>, IPassivable, IHasCreationTime
    {
        /// <summary>
        /// 用户 GUID 标识
        /// </summary>
        public Guid PrimaryId { get; set; }

        public string Name { get; set; }

        public string Surname { get; set; }

        public string UserName { get; set; }

        /// <summary>
        /// 部门标识
        /// </summary>
        public long OrganizationUnitId { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        public string OrganizationUnitName { get; set; }

        public string EmailAddress { get; set; }

        public string PhoneNumber { get; set; }

        public Guid? ProfilePictureId { get; set; }

        public bool IsEmailConfirmed { get; set; }

        public List<UserListRoleDto> Roles { get; set; }

        public DateTime? LastLoginTime { get; set; }

        public bool IsActive { get; set; }

        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 创建时间戳
        /// </summary>
        public long CreationUniversalTime { get { return CreationTime.ToUnixTimestamp(); } }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string Avatar { get; set; }
        /// <summary>
        /// 职位信息
        /// </summary>
        public string Position { get; set; }
        /// <summary>
        /// 性别：1男、2女
        /// </summary>
        public int Gender { get; set; }

    }
}